import 'package:json_annotation/json_annotation.dart';
part 'recipe_ecprotocol_api.g.dart';

@JsonSerializable(explicitToJson: true)
class ResponseRecipeEcprotocolApi {
  final List<CookParam>? cookParams;
  final String? id;
  final List<ProtocolStepInfo>? protocolStepInfoVos;
  final String? recipeId;
  final String? protocolJson;
  final String? electronicControlProtocol;
  final String? stepJson;

  ResponseRecipeEcprotocolApi({
    this.cookParams,
    this.id,
    this.protocolStepInfoVos,
    this.recipeId,
    this.protocolJson,
    this.electronicControlProtocol,
    this.stepJson,
  });

  factory ResponseRecipeEcprotocolApi.fromJson(Map<String, dynamic> json) =>
      _$ResponseRecipeEcprotocolApiFromJson(json);

  Map<String, dynamic> toJson() => _$ResponseRecipeEcprotocolApiToJson(this);
}

@JsonSerializable()
class CookParam {
  final int? isStop;
  final String? modeName;
  final int? timeMin;
  final String? modeCode;
  final int? timeHour;
  final int? modeIndex;
  final String? argPrimary;

  CookParam({
    this.isStop,
    this.modeName,
    this.timeMin,
    this.modeCode,
    this.timeHour,
    this.modeIndex,
    this.argPrimary,
  });

  factory CookParam.fromJson(Map<String, dynamic> json) =>
      _$CookParamFromJson(json);

  Map<String, dynamic> toJson() => _$CookParamToJson(this);
}

@JsonSerializable()
class ProtocolStepInfo {
  final String? argSecondaryCode;
  final int? plusFan;
  final int? isStop;
  final String? modeCode;
  final String? copy;
  final String? remark1;
  final int? plusSteam;
  final String? ossUrls;
  final int? timeMin;
  final String? modeName;
  final String? remark2;
  final String? argSecondary;
  final String? timeSec;
  final int? modeIndex;
  final String? argPrimaryCode;
  final String? argSecondaryName;
  final String? ossIds;
  final String? argPrimary;
  final String? argPrimaryName;
  final int? plusMicrowave;
  final int? timeHour;

  ProtocolStepInfo({
    this.argSecondaryCode,
    this.plusFan,
    this.isStop,
    this.modeCode,
    this.copy,
    this.remark1,
    this.plusSteam,
    this.ossUrls,
    this.timeMin,
    this.modeName,
    this.remark2,
    this.argSecondary,
    this.timeSec,
    this.modeIndex,
    this.argPrimaryCode,
    this.argSecondaryName,
    this.ossIds,
    this.argPrimary,
    this.argPrimaryName,
    this.plusMicrowave,
    this.timeHour,
  });

  factory ProtocolStepInfo.fromJson(Map<String, dynamic> json) =>
      _$ProtocolStepInfoFromJson(json);

  Map<String, dynamic> toJson() => _$ProtocolStepInfoToJson(this);
}
